Repository navigation
Pin how the two environment variables combine, and what disabled() says - #48
Merged
Merged
Conversation
Either variable opting out turns reporting off whatever the other says; blank and unlisted values leave it on; DO_NOT_TRACK is trimmed; and TraceClient.disabled() gives the config reason unless the environment already opted out. Tests only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (Phase 4, scored against CI run 43548326272 and the diff):
Judgment note: TraceClientTest.java:1201 (new). The enabled clients in The local This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stage B (unit-test expansion) cycle. Three characterization tests are added to
TraceClientTestfor environment opt-out behaviour that no existing test drove. Production code is not changed.environment_eitherVariableAloneTurnsReportingOffWhateverTheOtherSays: aTRACE_USAGE_REPORTINGopt-out is not cancelled by a non-opt-outDO_NOT_TRACK, and the reverse also holds. This pins the||inenvironmentDisables(). The previous tests only ever set one variable that opts out, or two that both leave reporting on.DO_NOT_TRACK=" Yes "is also covered, so trimming is now pinned for that variable as well as forTRACE_USAGE_REPORTING.environment_valuesThatAreNotAnOptOutLeaveReportingOn: blank, whitespace-only, opposite-word and unlisted values (disabled,offline,2,y) of each variable leave the client enabled. This matches the README "Opting out" row, which lists only the spellingsisOff/isYesaccept.disabled_isOffForTheConfigReasonUnlessTheEnvironmentSaysSoFirst:TraceClient.disabled()reportsREASON_CONFIGand has no install ID. Because the environment is checked first, it reportsREASON_ENVIRONMENTwhenDO_NOT_TRACK=1. Until now onlyisEnabled()was asserted for this factory.No tracking issue: these gaps were found during triage by comparing
environmentDisables(),isOff,isYesanddisabled()against the test file.Test plan
mvn -B verifylocally on JDK 21:Tests run: 116, Failures: 0, Errors: 0, Skipped: 0build (8),build (17),build (21)green on the PR headOpen issues not picked this cycle
Each open issue needs a maintainer decision, so the cycle was spent on tests instead:
enabled:switch is parsed, which is part of the opt-out contract.This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson